Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use services.Ticker #12668

Merged
merged 9 commits into from
Jul 3, 2024
Merged

use services.Ticker #12668

merged 9 commits into from
Jul 3, 2024

Conversation

jmank88
Copy link
Contributor

@jmank88 jmank88 commented Apr 3, 2024

Copy link
Contributor

github-actions bot commented Apr 3, 2024

I see you updated files related to core. Please run pnpm changeset in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

🎖️ No JIRA issue number found - Please include it in the PR title or in a commit message.

@jmank88 jmank88 changed the title use timeutil.Ticker use services.Ticker Apr 4, 2024
Copy link
Contributor

github-actions bot commented Jun 4, 2024

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@@ -120,6 +120,7 @@ func (o *zkSyncL1Oracle) run() {
func (o *zkSyncL1Oracle) refresh() (t *time.Timer) {
t, err := o.refreshWithError()
if err != nil {
o.logger.Criticalw("Failed to refresh gas price", "err", err)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simsonraj I had trouble debugging this PR, because these refresh methods are pushing errors to mark the service unhealthy, but without logging anything. These are typically paired with a critical log. Is that appropriate to do in this case, and the other files in this PR?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I think its appropriate to append an error, but not sure if it needs to be critical if it is polling. At least for zkSync case, it may not be since we dont need gasPrice exactly real-time & not sure how much impact an RPC malfunction will have here. Looking at Arbitrum it seems the intent was to log it as an error.
May be @amit-momin @FelixFan1992, any opinions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we looked at the timestamp, and only took this action (both log and unhealthy) if we cannot refresh after some threshold of time has passed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logging the error definitely makes sense here. Following the example of other gas estimator code, I think it's ok to log Critical here. If there's an RPC issue, it's likely a connectivity issue which we'd want to surface to NOPs urgently. Although I'm sure other components would also start making some noise for it.

@jmank88 jmank88 requested a review from simsonraj June 13, 2024 18:54
@jmank88 jmank88 enabled auto-merge June 28, 2024 17:59
@jmank88 jmank88 requested a review from nolag June 28, 2024 17:59
auto-merge was automatically disabled June 28, 2024 18:35

Pull Request is not mergeable

krehermann
krehermann previously approved these changes Jul 1, 2024
@jmank88 jmank88 added this pull request to the merge queue Jul 3, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 3, 2024
@jmank88 jmank88 added this pull request to the merge queue Jul 3, 2024
Merged via the queue into develop with commit dfd239a Jul 3, 2024
113 of 114 checks passed
@jmank88 jmank88 deleted the services-ticker branch July 3, 2024 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants